<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>国际研究生教育法律法规信息资料数据库</title>
<link href="css/userfile.css" type="text/css" rel="stylesheet"/>
<link href="css/base.css" type="text/css" rel="stylesheet"/>
<link href="css/page.css" type="text/css" rel="stylesheet"/>
</head>



<body>

  <s:include value="../user_page_top.jsp"/>
  <div style="height:20px;"></div>
<div class = "usercont">

  	<s:include value="../user_page_left.jsp"/>
  
  
    <div class="width-800 right">
    <div class="righttcont">
        	<div class="search">
        	<s:form action="userlist" namespace="/admin" method="get">
				<s:textfield name="searchInfo" />
				<s:hidden name="pageSize" value="15"></s:hidden>
	    		<s:hidden name="pageNow" value="1"></s:hidden>
				<button type="submit" >搜索用户</button>
			</s:form>
        	 
            </div>
        </div>
        
		
        
        <div style="height:20px;"></div>
        <div class="righttcont">
        	<div class="title"><h3>用户列表</h3>
            </div>
			<table class="list_style">
  <thead>
  <tr class="tcat">
    <td style="width: 150px;">用户名</td>
    <td style="width: auto;">邮箱</td>
    
    <td style="width: 150px;">管理员</td>
    <td style="width: 150px;">操作</td>
  </tr>
  </thead>
  <tbody class="tbody">
  <s:iterator value="userList" status="stat">
  	<tr 
  		<s:if test="#stat.odd" > class="alt1"</s:if>
  		>
	    <td>
	   	<s:property value="username" />
	    </td>
	    <td><s:property value="email"/></td>
	    <td>
	    
	    <s:if test="isAdmin == true">是</s:if>
	    <s:else>否</s:else>
	    	
	    	
	    </td>
	    <td>
	    <a href="<s:url action="editpage" namespace="/admin">
	    	<s:param name="username_sl" value="username"></s:param>	    	
          	</s:url>"
        >编辑</a>
	    </td>
	  </tr>
	  </s:iterator>
  </tbody>
</table>

 <div class="messagepage">
 
	  <p style="margin-left:20px">共<s:property value="pageCount"/>条，当前第<s:property value="pageNow"/>页，每页<s:property value="pageSize"/>条</p>
	  
	  <ul>
	  <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="1"></s:param>	
	    	<s:param name="searchInfo" value="searchInfo"></s:param>
          	</s:url>"
        >首页</a>
       </li>
	  <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="pageNow-1"></s:param>	
	    	<s:param name="searchInfo" value="searchInfo"></s:param>
          	</s:url>"
        >上一页</a>
        </li>
      
	  <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="pageNow+1"></s:param>	
	    	<s:param name="searchInfo" value="searchInfo"></s:param>
          	</s:url>"
        >下一页</a>
        </li>
      <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="pageCount/pageSize+1"></s:param>	 
	    	<s:param name="searchInfo" value="searchInfo"></s:param>   	
          	</s:url>"
        >末页</a>
        </li>
        </ul>
       
        </div>
        </div>
     </div>
</div>
    
	<s:include value="../foot.jsp"/>
    
     


</body>
</html>
